Skip to content

Add building and container recipes#28

Closed
Noxaster wants to merge 2 commits intoSimulation-Software-Engineering:mainfrom
Noxaster:main
Closed

Add building and container recipes#28
Noxaster wants to merge 2 commits intoSimulation-Software-Engineering:mainfrom
Noxaster:main

Conversation

@Noxaster
Copy link
Copy Markdown

Build with the Dockerfile and run the container

Changelogs

  • Create CMakeLists.txt
  • Create Dockerfile
  • Edit main.cpp

Usage

docker build -t cmake-exercise .
docker run -it -v ${PWD}:/cmake-exercise cmake-exercise
./build_and_run.sh

@Noxaster
Copy link
Copy Markdown
Author

GitLab username: shayo

Copy link
Copy Markdown

@MakisH MakisH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good here and works, thanks!


target_link_libraries(main Boost::filesystem yaml-cpp)

DEAL_II_SETUP_TARGET(main) No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, in CMake, lowercase and uppercase are equivalent.

make && \
make install

ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, LD_LIBRARY_PATH at the right-hand side is undefined at this point.


ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

WORKDIR /cmake-exercise
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a WORKDIR set, I would expect it to exist and have contents, independently of the user-defined mount.

@MakisH MakisH closed this Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants